import request from '@/router/axios';

// 发货计划分页
export const getList = (current, size, params) => {
  return request({
    url: '/api/mes-warehouse/sheetheader/page?sheetTypeStrList=DO',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  });
};

export const getDetail = (id) => {
  return request({
    url: '/api/mes-warehouse/sheetheader/sheet-detail/list-with-part-master',
    method: 'get',
    params: {
      sheetHeaderId: id
    }
  });
};

export const remove = (ids) => {
  return request({
    url: '/api/mes-warehouse/sheetheader/remove',
    method: 'post',
    params: {
      ids
    }
  });
};

export const add = (row) => {
  return request({
    url: '/api/mes-warehouse/sheetheader/submit',
    method: 'post',
    data: row
  });
};

export const update = (row) => {
  return request({
    url: '/api/mes-warehouse/sheetheader/submit',
    method: 'post',
    data: row
  });
};

// 查询客户地址
export const partnerLocationList = (params) => {
  return request({
    url: '/api/mes-admin/partner/partner-location/list',
    method: 'get',
    params
  });
};
